Skip to content

fix: validate contextual executable cache aliases - #502

Draft
Karthik Nadig (karthiknadig) wants to merge 3 commits into
mainfrom
fix/issue-448
Draft

fix: validate contextual executable cache aliases#502
Karthik Nadig (karthiknadig) wants to merge 3 commits into
mainfrom
fix/issue-448

Conversation

@karthiknadig

@karthiknadig Karthik Nadig (karthiknadig) commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary

Fix PET's executable-detail cache so relative and absolute aliases for the same interpreter share a stable cache identity without changing the intentionally short caller-facing alias.

  • normalize cache keys without resolving symlinks or junctions
  • preserve Python's canonical sys.executable for locator identification
  • preserve validated short aliases while adapting cache hits to the current caller
  • drop stale relative aliases when a disk cache is reused from another working directory
  • invalidate in-memory entries when tracked executables disappear
  • version the disk cache and cover memory, disk, invalidation, stale-context, canonical-executable, and fast-path behavior

Validation

  • cargo test --all
  • ./scripts/rust-precommit.ps1

Fixes #448

Unify relative and absolute cache identities while preserving short caller-facing aliases. Invalidate missing tracked executables and cover memory, disk, and fast-path behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Drop stale relative aliases when a disk cache is reused from another working directory while retaining validated short aliases. Keep the common absolute-cache-hit path free of current-directory lookups.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Keep Python's sys.executable for locator identification while updating only validated caller aliases. This restores macOS python.org classification without changing short user-facing alias selection.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Performance Report (Windows) ✅

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 8ms 11ms 9ms -1ms -11.1%
Full Refresh 149ms 1462ms 152ms -3ms -2%

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Test Coverage Report (Windows)

Metric Value
Current Coverage 78.05%
Base Branch Coverage 77.53%
Delta 0.52% ✅

Coverage increased! Great work!

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Performance Report (Linux) ➖

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 1ms 1ms 1ms 0ms 0%
Full Refresh 56ms 880ms 54ms 2ms 0%

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Test Coverage Report (Linux)

Metric Value
Current Coverage 81.1%
Base Branch Coverage 80.6%
Delta .5% ✅

Coverage increased! Great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

incorrectly saved pythonLocator setting on remote settings

2 participants